<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jstl/core" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<link rel="stylesheet" href="all.css" type="text/css" media="screen" />
<link rel="stylesheet" type="text/css" href="jquery.lightbox-0.5.css" media="screen" />
    <script src="jquery-1.7.2.min.js"></script>
     <script type="text/javascript" src="jquery.lightbox-0.5.js"></script>
    <script src="login.js"></script>
    <script src="edit.js"></script>
    <script src="enter.js"></script>
<title>活动详情 - <c:out value="${leagueBean.name}" /></title>

<script type="text/javascript">
window.onload=function(){
	rightH=document.getElementById("huodong_right").offsetHeight;
	if(rightH<600){
		document.getElementById("huodong_left").style.height=600+"px";}
		else{
			document.getElementById("huodong_left").style.height=rightH+"px";
		}
	select();
	}
$(function() {
	
	$('#huodong_right_join_haibao .post_link').lightBox({fixedNavigation:true}); // Select all links in the page
	
});
</script>

</head>

<body>
<div id="main">
 <div id="header">
       <div id="header_inner">
          <div id="header_inner_top">
          <div id="container">
             <jsp:include page="./head.jsp" flush="true"/>
        </div>
        </div>
	</div>
    </div>
	<div id="huodong_body">
    	<div id="huodong_left">
        	<div id="left_left">
        		<div id="left_logo">
               		<a  class="left_a" href="http://herald.seu.edu.cn" >
                 	
              		 </a>  
            	</div>
                <div id="left_platform">
               		<a class="left_a" href="http://herald.seu.edu.cn/league_p/" >
                 	
              		 </a>  
            	</div>
                <div id="left_home">
               		<a class="left_a" href="home.jsp?league=<%=request.getParameter("league") %>" >
                 	
              		 </a>  
            	</div>
                <div id="left_information">
               		<a class="left_a" href="activities.jsp?league=<%=request.getParameter("league") %>" >
                 	
              		 </a>  
            	</div>
                <div id="left_album">
               		<a class="left_a"  href="albums.jsp?league=<%=request.getParameter("league") %>" >
                 	
              		 </a>  
            	</div>
                <div id="left_recruiting">
               		<a class="left_a" href="recruit.jsp?league=<%=request.getParameter("league") %>" >
                 	
              		 </a>  
            	</div>
                <div id="left_polling">
               		<a  class="left_a" href="polling.jsp?league=<%=request.getParameter("league") %>" >
                 	
              		 </a>  
            	</div>
                <div id="left_guestbook">
               		<a  class="left_a" href="guestbook.jsp?league=<%=request.getParameter("league") %>" >
                 	
              		 </a>  
            	</div>
    
             </div>
             <div id="left_right">
             </div>
         </div>
         <div id="huodong_right">
         	<div id="right_title_kuangjia">
         	<div id="right_title">
                <div id="right_title_name">
                   <p><c:out value="${leagueBean.name}" /></p>
                </div>
                
                <!--未登录  -->
                <c:if test="${leagueUserAuth == null&&commonUserAuth == null}">
                <div id="right_title_attention">
                	<div id="right_title_attention_plus">
                    </div>
                    <div id="right_title_attention_text">
                    <form id="attentionAddForm" action="./AttentionAdd">
                    <input name="league" type="hidden" value=<%=request.getParameter("league") %> />
                    <input name="url" type="hidden" id="url" value="" />
                    </form>
                        <a title="加关注" href="javascript:void(0)" onclick="javascript:alert('您好，请您先登录。')">加关注</a>
                    </div>
                </div>
                </c:if>
                
                <!--未加关注  -->
                <c:if test="${attention == false && leagueUserAuth == null && commonUserAuth != null}">
                <div id="right_title_attention">
                	
                    <div id="right_title_attention_text">
                    <form id="attentionAddForm" action="./AttentionAdd" onsubmit="return false;">
                    <input name="league" type="hidden" value=<%=request.getParameter("league") %> />
                    <input name="url" type="hidden" id="url" value="" />
                    </form>
                    
                        <a id="att" style="display:block" title="加关注&nbsp;&nbsp;" href="javascript:void(0)" onclick="javascript:attention(<%=request.getParameter("league") %>);"><div id="right_title_attention_plus">
                    </div>加关注</a>
                        <a id="cancleAtt" style="display:none" title="取消关注" href="javascript:void(0)" onclick="javascript:cancleAttention(<%=request.getParameter("league") %>);">取消关注</a>
                    </div>
                </div>
                </c:if>
                
                <!--已加关注-->
                <c:if test="${attention == true}">
                <div id="right_title_attention">
                    <div id="right_title_attention_text">
                    <form id="attentionDeleteForm" action="./AttentionDelete">
                    <input name="league" type="hidden" value=<%=request.getParameter("league") %> />
                    <input name="url" type="hidden" id="url" value="" />
                    </form>
                    <a id="att" style="display:none" title="加关注&nbsp;&nbsp;" href="javascript:void(0)" onclick="javascript:attention(<%=request.getParameter("league") %>);"><div id="right_title_attention_plus">
                    </div>加关注</a>
                    <a id="cancleAtt" style="display:block" title="取消关注" href="javascript:void(0)" onclick="javascript:cancleAttention(<%=request.getParameter("league") %>);">取消关注</a>
                    </div>
                </div>
                </c:if>
                
            </div>
            </div>
            <div id="huodong_right_join">
            	<div id="huodong_right_join_title">
            		<div id="huodong_right_join_title_biaozhi">
               	 	</div>
                    <div id="huodong_right_join_title_text_kuangjia">
               	    <div id="huodong_right_join_title_text">
                		<p><c:out value="${activityBean.name}" /></p>
                	</div>
                    </div>
                    <div id="huodong_right_join_caozuo_kuangjia">
                    <!--<c:if test="${leagueUserAuth != null && param.league != null && leagueUserAuth.leagueId == param.league}">
               	 	<div id="huodong_right_join_caozuo">
                		<a href="javascript:void(0)"  onclick="javascript:showDiv()">编辑</a>
                	</div>
                	</c:if>
                	-->
                    </div>
                </div>
                
                <div id="right_join_introduce_kuangjia">
                <div id="right_join_introduce">
                    <div id="right_jion_introduce_time_kuangjia">
                	<div id="right_join_introduce_time">
                    	<div id="right_join_introduce_time_logo">
                        </div>
                        <div id="right_join_introduce_time_text">
                        	活动发布时间：<c:out value="${activityBean.releaseTime}" />
                        </div>
                    </div>
                    </div>
                    <div id="right_join_introduce_pinglun_kuangjia">
                    <div id="right_join_introduce_pinglun">
                    	<div id="right_join_introduce_pinglun_logo">
                        </div>
                        <div id="right_join_introduce_pinglun_text">
                        	<a href="#"><c:out value="${messagesSize}" default="0" />条留言</a>
                        </div>
                    </div>
                    </div>
                    
                   
                    
                    <div id="right_join_introduce_text">
                    <br />
                    <p style="padding:3px;" id="share_p" align="right">
                    <!-- 微博 -->
						<script type="text/javascript" charset="utf-8">
							(function(){
							  var _w = 106 , _h = 24;
							  var param = {
							    url:location.href,
							    type:'5',
							    count:'', /**是否显示分享数，1显示(可选)*/
							    appkey:'', /**您申请的应用appkey,显示分享来源(可选)*/
							    title:'<c:out value="${activityBean.name}" />', /**分享的文字内容(可选，默认为所在页面的title)*/
							    pic:location.protocol + "//" + location.host + "/" + location.pathname + "/../" + '<c:out value="${activityBean.picWallAddress}" />', /**分享图片的路径(可选)*/
							    ralateUid:'', /**关联用户的UID，分享微博会@该用户(可选)*/
								language:'zh_cn', /**设置语言，zh_cn|zh_tw(可选)*/
							    rnd:new Date().valueOf()
							  }
							  var temp = [];
							  for( var p in param ){
							    temp.push(p + '=' + encodeURIComponent( param[p] || '' ) )
							  }
							  
							  document.write('<iframe style="display:block; float:right;" allowTransparency="true" frameborder="0" scrolling="no" src="./weiboshare.html?' + temp.join('&') + '" width="'+ _w+'" height="'+_h+'"></iframe>')
									
								})()
							</script>
                    <!-- 人人 -->
                    <script type="text/javascript" src="./rrshare.js"></script>
						<a style="display:block; padding-left:3px;float:right;height:24px; width:108px; margin-right:3px;" name="xn_share" onclick="shareClick()" type="button_large" href="javascript:;"></a>
					<script type="text/javascript">
						function shareClick() {
							var rrShareParam = {
									resourceUrl : location.href,	//分享的资源Url
									pic : location.protocol + "//" + location.host + "/" + location.pathname + "/../" + '<c:out value="${activityBean.picWallAddress}" />',		//分享的主题图片Url
									title : '<c:out value="${activityBean.name}" />',		//分享的标题
									description : '<c:out value="${activityBean.information}" />'	//分享的详细描述
								};
							rrShareOnclick(rrShareParam);
						}
					</script>
						
							</p>
                    	<c:out value="${activityBean.information}" />
                    </div>
                    <div id="huodong_right_join_haibao_kuangjia">
                    <div id="huodong_right_join_haibao">
                    <a class="post_link" href="<c:out value="${activityBean.picWallAddress}"/>" >
                    <img src="<c:out value="${activityBean.postAddress}" />" />
                    </a>
                    </div>
                    </div>
                </div>    
                </div>
                 
            </div>
            <div id="right_xiangqing_kuangjia">
            <div id="right_xiangqing">
            	<div id="huodong_right_xiangqing_title">
                </div>
                <div id="huodong_right_join_xiugai_kuangjia">
                <!--<c:if test="${leagueUserAuth != null && param.league != null && leagueUserAuth.leagueId == param.league}">
                  <div id="huodong_right_join_xiugai">
                	<a href="#" onclick="javascript:showDiv1()">修改</a>
                </div>
                </c:if>-->
                </div>
                <div id="right_xiangqing_line_kuangjia">
                <div class="right_xiangqing_line">
                </div>
                </div>
                <div id="right_xiangqing_nr">
                	<div id="right_xiangqing_nr_introduce">
                    	<p>开始时间：<c:out value="${activityBean.startTime}" /></p>
                    	<p>结束时间：<c:out value="${activityBean.endTime}" /></p>
                        <p>联系方式：<c:out value="${activityBean.contact}" /></p>
                        <p>组织者：<c:out value="${activityBean.organizer}" /></p>
                    </div>
                    <div id="right_xiangqing_nr_click_kj">
                    
                    </div>
                </div>
                <div class="right_xiangqing_line">
                </div>
            </div>
            </div>
            <div id="right_liuyan_kj">
            <div id="right_liuyan">
            	<div id="right_liuyan_title">
                </div>
                <div id="right_liuyan_line_kj">
                <div id="right_liuyan_line">
                </div>
                </div>
                
                <c:forEach items="${messages}" var="message" varStatus="varStatus">
                <div class="right_liouyan_liuyan1_kj">
                <div class="right_liuyan_liuyan1">
                	<div class="right_liuyan_liuyan1_photo" style="background-image:url(images/shetuanzhaoxin_31.png)">
                    </div>
                    <div class="right_liuyan_liuyan1_text_kj">
                    <div class="right_liuyan_liuyan1_text">
                    	<div class="right_liuyan_liuyan1_text_title">
                        	<div class="right_liuyan_liuyan1_text_title_line">
                            </div>
                            <div class="right_liuyan_liuyan1_text_title_infor">
                                <div class="right_liuyan_liuyan1_text_title_infor_name_kj">
                            	<div class="right_liuyan_liuyan1_text_title_infor_name">
                                	<p><c:out value="${message.entity.name}" /></p>
                                </div>
                                </div>
                                <div class="right_liuyan_liuyan1_text_title_infor_time_kj">
                                <div class="right_liuyan_liuyan1_text_title_infor_time">
                                	<p><c:out value="${message.entity.date}" /></p>
                                </div>
                                </div>
                                <div class="right_liuyan_liuyan1_text_title_infor_lou_kj">
                                <div class="right_liuyan_liuyan1_text_title_infor_lou">
                                	<p><c:out value="${varStatus.count}" />楼</p>
                                </div>
                                </div>
                                
                                <div class="right_liuyan_liuyan1_text_title_infor_liuyandel">
                                 <c:if test="${(leagueUserAuth != null && param.league != null && leagueUserAuth.leagueId == param.league) || (commonUserAuth != null && commonUserAuth.userId == message.entity.userId)}">
                                <a href="javascript:void(0)" onclick="javascript:showDivDelete(<c:out value="${message.link}"/>)">删除</a>
                                </c:if>
                                </div>
                                
                                </div>
                            <div class="right_liuyan_liuyan1_text_title_line">
                            
                        </div>
                        </div>
                        <div class="right_liuyan_liuyan1_text_wenzi">
                        	<p><c:out value="${message.entity.content}" /></p>
                        </div>
                    
                    </div>
                </div>
                </div>
                </div>
                </c:forEach>
                
                <c:choose>
	            <c:when test="${leagueUserAuth != null || commonUserAuth != null}">
                <div id="right_write">
                    <div id="right_write_title_kj">
                	<div id="right_write_title">
                       <p>我来说两句...</p>
                    </div>
                    </div>
                    <div id="right_write_line_kj">
                    <div id="right_write_line">
                    </div>
                    </div>
                    <form id="addRemark" action="./MessagePost" method="post">
                    <div id="right_write_form_kj">
                    <div id="right_write_form">
                    
                    <textarea name="content" id="right_write_form_body"></textarea>
                     <input type="hidden" name="leagueId" value=<%=request.getParameter("league") %> />
                     <input type="hidden" name="activityId" value=<%=request.getParameter("activity") %> />
                    </div>
                    </div>
                    <div id="right_write_fabu_kj">
                    <div id="right_write_fabu">
                    	<a id="right_write_fabu_lj" href="javascript:void(0)" onclick="submitForm('right_write_form_body','addRemark');">
                        </a>
                    </div>
                    </div>
                    </form>
                </div>
                </c:when>
                <c:otherwise>
                <p style="height:21px;width:128px;float:left;font-size:16px;padding:8px;color:#3A3A3A;font-family:'微软雅黑'；">登录后即可留言。</p>
                </c:otherwise>
                </c:choose>
            </div>
            </div>
         </div>
         <div class="clear">
	     </div>
		 </div>

     <div id="popDivDel" class="mydiv" style="display:none;">
确定删除留言？
<form  action="./MessageDelete" method="post" >
    <input type="hidden" name="league" value=<%=request.getParameter("league") %> />
    <input type="hidden" name="activity" value=<%=request.getParameter("activity") %> />
    <input id="del_item_id" type="hidden" name="message" value="0" />
    <input type="submit" value="确定" name="submit" />
    <a href="javascript:closeDivDelete()">取消</a>
</form>
</div>
<div id="bg" class="bg" style="display:none;"></div>  
      
   
        
<jsp:include page="./footer.jsp" flush="true"/> 


</div>


</body>
</html>
